package com.ruoyi.mes.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 采购订单对象 buy_order
 *
 * @author LongAndHao
 * @date 2023-04-04
 */
public class BuyOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 采购需求单号 */
    private String needCode;

    /** 采购订单编号 */
    @Excel(name = "采购订单编号")
    private String buyOrderCode;

    /** 采购订单名称 */
    @Excel(name = "采购订单名称")
    private String orderName;

    /** 物料编号 */
    @Excel(name = "物料编号")
    private String mtrCode;

    /** 物料名称 */
    @Excel(name = "物料名称")
    private String mtrName;

    /** 采购数量 */
    @Excel(name = "采购数量")
    private Long buyQuantity;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 成本 */
    @Excel(name = "成本")
    private BigDecimal cost;

    /** 供应商 */
    @Excel(name = "供应商")
    private String supplier;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public String getNeedCode() {
        return needCode;
    }

    public void setNeedCode(String needCode) {
        this.needCode = needCode;
    }

    public void setBuyOrderCode(String buyOrderCode)
    {
        this.buyOrderCode = buyOrderCode;
    }

    public String getBuyOrderCode()
    {
        return buyOrderCode;
    }
    public void setMtrCode(String mtrCode)
    {
        this.mtrCode = mtrCode;
    }

    public String getMtrCode()
    {
        return mtrCode;
    }
    public void setMtrName(String mtrName)
    {
        this.mtrName = mtrName;
    }

    public String getMtrName()
    {
        return mtrName;
    }
    public void setBuyQuantity(Long buyQuantity)
    {
        this.buyQuantity = buyQuantity;
    }

    public Long getBuyQuantity()
    {
        return buyQuantity;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setSupplier(String supplier)
    {
        this.supplier = supplier;
    }

    public String getSupplier()
    {
        return supplier;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("needId", getNeedCode())
            .append("buyOrderCode", getBuyOrderCode())
            .append("mtrCode", getMtrCode())
            .append("mtrName", getMtrName())
            .append("buyQuantity", getBuyQuantity())
            .append("status", getStatus())
            .append("supplier", getSupplier())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
